@import './base.css';
@import './page-fixes.css';

/* 古风应用样式 */
#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  font-weight: normal;
  min-height: 100vh;
  position: relative;
}

/* 动漫风格装饰元素 */
#app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: 
    /* 动漫风格的花朵和星星装饰 */
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%234fd670' fill-opacity='0.04'%3E%3Cpath d='M40 15l3 9h9l-7 5 3 9-8-6-8 6 3-9-7-5h9z'/%3E%3Ccircle cx='20' cy='60' r='3'/%3E%3Ccircle cx='60' cy='20' r='2'/%3E%3Cpath d='M10 30c0-3 2-5 5-5s5 2 5 5-2 5-5 5-5-2-5-5z'/%3E%3Cpath d='M60 60c0-4 3-7 7-7s7 3 7 7-3 7-7 7-7-3-7-7z'/%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
}

/* 动漫风格的浮动装饰 */
#app::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%237de89c' fill-opacity='0.02'%3E%3Cpath d='M50 50c0-15 10-25 25-25s25 10 25 25-10 25-25 25-25-10-25-25z'/%3E%3Cpath d='M150 150c0-20 15-35 35-35s35 15 35 35-15 35-35 35-35-15-35-35z'/%3E%3Cpath d='M30 120l5 5-5 5-5-5z'/%3E%3Cpath d='M170 30l8 8-8 8-8-8z'/%3E%3C/g%3E%3C/svg%3E");
  z-index: -2;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(1deg); }
  50% { transform: translateY(-5px) rotate(0deg); }
  75% { transform: translateY(-15px) rotate(-1deg); }
}

/* 链接样式 - 古风设计 */
a {
  text-decoration: none;
  color: var(--color-primary);
  transition: all 0.3s ease;
  padding: 4px 8px;
  border-radius: var(--border-radius);
  position: relative;
  display: inline-block;
}

a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

@media (hover: hover) {
  a:hover {
    color: var(--color-accent);
    background-color: rgba(139, 154, 107, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
  }
  
  a:hover::after {
    width: 100%;
  }
}

/* 动漫风格卡片样式 */
.card {
  background: var(--color-background-soft);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--border-radius) * 1.5);
  padding: 2rem;
  margin: 1rem 0;
  box-shadow: var(--shadow-soft);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* 彩虹顶部装饰条 */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent), #ff9eb5, #87ceeb);
  animation: rainbow-flow 3s ease-in-out infinite;
}

/* 动漫风格的光效 */
.card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 214, 112, 0.1) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-anime);
  border-color: var(--color-primary);
}

.card:hover::after {
  transform: scale(1);
}

@keyframes rainbow-flow {
  0%, 100% { 
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent), #ff9eb5, #87ceeb);
  }
  50% { 
    background: linear-gradient(90deg, #87ceeb, var(--color-primary), var(--color-secondary), var(--color-accent), #ff9eb5);
  }
}

/* 动漫风格按钮样式 */
.btn-ancient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  color: white;
  padding: 14px 28px;
  border-radius: calc(var(--border-radius) * 1.2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  letter-spacing: 0.5px;
}

/* 动漫风格闪光效果 */
.btn-ancient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 星星装饰效果 */
.btn-ancient::after {
  content: '✨';
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%) scale(0);
  transition: transform 0.3s ease;
  opacity: 0.8;
}

.btn-ancient:hover::before {
  left: 100%;
}

.btn-ancient:hover::after {
  transform: translateY(-50%) scale(1);
}

.btn-ancient:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-anime);
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
}

.btn-ancient:active {
  transform: translateY(-1px) scale(1.02);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  margin: 1.5rem 0 1rem;
  font-weight: 600;
  line-height: 1.4;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  position: relative;
  padding: 1rem 0;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: translateX(-50%);
  border-radius: 2px;
}

/* 响应式设计 */
@media (min-width: 768px) {
  #app {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  #app {
    padding: 2rem 3rem;
  }
}
